1. Field of the Invention
The present invention relates to an image processing apparatus such as a copying machine or a facsimile apparatus, and more particularly to an image processing apparatus which, when processing a color image, can apply to each different kind of image region, an optimum process according to characteristics of the image region.
2. Description of the Related Art
When reproducing color images using a color digital copying machine, color facsimile apparatus or the like, a color discrimination process is performed and, in non-colored image regions is used only black ink or black toner so as to form images of good image quality. In colored image regions are used inks or toners of three primary colors, cyan (C), magenta (M), and yellow (Y) to form color images. Black images could also be formed using all the three primary color inks or toners, but since registration errors tend to occur when overlaying colors one on top of another, causing problems such as colored tinges at black edges. Accordingly in the case of forming characters, the quality of images of characters would degrade. A color discrimination process thus becomes necessary to discriminate between non-colored and colored regions. Furthermore, using only black ink or black toner for non-colored regions has the effect of reducing the amount of use of the inks or toners of the three primary colors.
The color discrimination process is performed using an output from an image reading input apparatus such as a scanner. This kind of input apparatus contains an imaging device such as CCD (charged coupled device) and reads an image as a collection of pixels. In an imaging device such as a CCD, a plurality of light receiving elements are arranged to correspond with pixels. However, because of variations in characteristics such as sensitivity among the plurality of light receiving elements, pixel displacements may occur among inputs corresponding to the respective colors. If such pixel displacements occur, an input condition in which red (R), green (G), and blue (B) are equal in density cannot be obtained; as a result, with a pixel-by-pixel color discrimination process, when an image of a non-colored region is input, the region may often be judged erroneously as being a colored region.
Japanese Unexamined Patent Publication JP-A 5-41796 (1993) discloses a technique for correcting pixel displacements by applying smoothing prior to the color discrimination process. The color discrimination is accomplished by obtaining a maximum value and a minimum value of the density of each color and by comparing the two values to determine through binarization whether the color is achromatic or not. To discriminate a character region, photographic region, halftoned region, etc., a mask region is set and the image density within the mask region is binarized; then, using as an address signal the binarized image density of the pixels contained within the mask, a search is made through a lookup table and data prestored in the lookup table is evaluated as a characteristic value.
If a smoothing process is applied prior to the color discrimination process in order to prevent pixel displacements of RGB inputs, etc. caused by variations within an input apparatus, as practiced in the prior art of JP-A 5-41796, since such a process is not appropriate as a process for correcting pixel displacements, an erroneous discrimination may result. More specifically, a process based only on the maximum and minimum values cannot provide a sufficient number of parameters to achieve accurate color discrimination, and the possibility of erroneously judging a colored region as being a non-colored region or a non-colored region as being a colored region cannot be eliminated. Furthermore, though provisions are made to discriminate character regions, photographic regions, halftoned regions, etc. using a lookup table, it is extraordinary difficult to create a lookup table which can yield good discrimination results, and also, information is not easily obtainable on how the lookup table is to be corrected when there occur many errors in discrimination results. Moreover, when the process is performed using only the smoothing technique, not only pixel displacements but also the differences in color originally present in the original document are all absorbed, and such a process is therefore not effective in color discrimination.
It is an object of the present invention to provide an image processing apparatus capable of accurately discriminating image region characteristics of an image region of an input to the apparatus, including a discrimination process of characters, photographs or half tone dots and a color discrimination process, regardless of whether the input to the apparatus contains pixel displacements, noise, etc.
The present invention provides an image processing apparatus which carries out a process of discriminating characteristics of a region including an object pixel in order to optimally process an original document which may contain a mixture of different kinds of image regions including characters, photographs and halftone regions, according to characteristics of each image region, comprising:
a mask setting circuit for setting within the region including the object pixel a mask of a predetermined shape so as to contain therein the object pixel;
a sub-region mask generation circuit for generating sub-region masks, each smaller than the mask set by the mask setting circuit, sequentially in different positions within the mask set by the mask setting circuit, to obtain a sum of pixel densities within each of the sub-region masks;
a parameter calculation circuit for calculating a parameter within the mask, using the sum of pixel densities obtained by the sub-region mask generation circuit;
multi-valuing means for performing a multi-valuing process using the parameter calculated by the parameter calculation circuit;
characteristic signal generating means for generating from distribution of multi-valued data generated by the multi-valuing means, within the mask, a characteristic signal represented by the multi-valued data; and
region discriminating means for discriminating the characteristics of the region, based on the characteristic signal supplied from the characteristic signal generating means.
According to the invention, for the original document containing a mixture of characters, photographs, halftone dots, etc., the process of discriminating character regions, photograph regions and halftone regions is performed in order to process the document optimally in accordance with the characteristics of the respective image regions. The mask setting circuit sets a mask containing an object pixel. The mask has a predetermined shape, for example, a shape consisting of mxc3x97n pixels. The sub-region mask generation circuit generates sub-region masks, each consisting of uxc3x97v pixels, wherein mxe2x89xa7u and nxe2x89xa7v, and having a shape smaller than that of the mask set by the mask setting circuit, by sequentially setting the sub-region masks in different positions within the mask, and obtains the sum of pixel densities within each of the sub-region masks. The parameter calculation circuit calculates a parameter within the mask, using the sum of pixel densities obtained by the sub-region mask generation circuit. The multi-valuing means performs the multi-valuing process using the parameter calculated by the parameter calculation circuit. From the distribution of the multi-valued data generated by the multi-valuing means, within the mask, the characteristic signal generating means generates a characteristic signal representing a characteristic amount expressed by the multi-valued data. The region discriminating means discriminates the characteristics of the region, based on the characteristic signal supplied from the characteristic signal generating means. For example, by performing a process of obtaining the sum of pixel densities set by the mask setting circuit within the mask, the characteristics of each image region can be discriminated accurately by reducing the effects of pixel displacements, noise, etc., even when the input signal contains pixel displacements, noise, etc.
As described above, according to the invention, to discriminate the characteristics of the image region containing the object pixel, the mask is set within which a sub-region mask is further set and, while sequentially moving the sub-region mask within the mask, the sum of pixel densities within the sub-region mask is obtained and a parameter is calculated; then, a multi-valuing process is performed and, from the distribution of the multi-valued data, characteristics are obtained and the process of discriminating the characteristics of the region is performed in accordance with the obtained characteristics. Accordingly, the characteristics of the region can be discriminated accurately, even when the input signal contains pixel displacements, noise, etc.
In the invention it is preferable that the multi-valuing means performs the multi-valuing process by combining a plurality of characteristic amounts, based on the sum of pixel densities obtained within the sub-region mask by the sub-region mask generation circuit.
According to the invention, since the multi-valuing means performs the multi-valuing process by combining the plurality of characteristic amounts obtained from the sum of pixel densities within the sub-region mask, the multi-valuing process which matches, for example, characteristics of an input apparatus can be performed, thus making it possible to discriminate the characteristics of each image region in accordance with the input apparatus.
As described above, according to the invention, since the multi-valuing process is performed by combining the several characteristic amounts obtained from the sum of the pixel densities within the sub-region mask, the multi-valuing process which matches the characteristics of an image input apparatus can be performed, thus making it possible to perform an optimum process of discriminating characteristics of each image region in accordance with the input apparatus used.
In the invention it is preferable that the characteristic signal generating means generates the characteristic signal represented by the multi-valued data by combining a plurality of characteristic amounts based on the distribution of the multi-valued data generated by the multi-valuing means for each of the sub-region masks.
According to the invention, since the characteristic signal generating means generates the characteristic signal by combining the plurality of characteristic amounts based on the distribution of the multi-valued data obtained by the multi-valuing process for each of the sub-region masks, the characteristic signal can be generated which matches a post-process, enabling the post-process to be performed in a variety of ways and in suitable fashion.
As described above, according to the invention, since the process of discriminating the characteristics of each image region can be performed in accordance with the combination of the plurality of characteristic amounts obtained from the distribution of the multi-valued data obtained by the multi-valuing process for each of the sub-region masks, the characteristics of the region can be discriminated under conditions optimized for the post-process.
The present invention also provides an image processing apparatus which carries out a process of discriminating characteristics of a region including an object pixel in order to optimally process an original document which may contain a mixture of different kinds of image regions including characters, photographs and halftone regions, according to characteristics of each image region, comprising:
a mask setting circuit for setting within the region including the object pixel a mask of a predetermined shape so as to contain therein the object pixel;
a sub-region mask generation circuit for generating sub-region masks, each smaller than the mask set by the mask setting circuit, sequentially in different positions within the mask set by the mask setting circuit, to obtain a maximum value of pixel densities within each of the sub-region masks;
characteristic amount calculating means for calculating a characteristic amount within the mask, using the maximum value of pixel densities obtained by the sub-region mask generation circuit;
average pixel density calculating means for obtaining an average of pixel densities in the sub-region mask having a smallest density variation of all the sub-region masks generated by the sub-region mask generation circuit;
characteristic signal generating means for generating a characteristic signal associated with the average pixel density using the characteristic amount supplied from the characteristic amount calculating means and the average pixel density supplied from the average pixel density calculating means;
a binarizing circuit for binarizing, based on the average pixel density, each of the sub-region masks generated by the sub-region mask generation circuit; and
region discriminating means for discriminating the characteristics of the region whose binarized density is high to consider the characteristic amount represented by the characteristic signal generated by the characteristic signal generating means for the region as a discrimination result for the object pixel.
According to the invention, when processing an original document containing a mixture of characters, photographs, halftone dots, etc., a process of discriminating character, photographic, and halftone regions is performed in order to apply a process optimized to the characteristic of each image region. The mask setting circuit sets a mask of a predetermined shape containing an object pixel and, for example, consisting of mxc3x97n pixels. The sub-region mask generation circuit generates sub-region masks each of which is smaller than the mask and consists of uxc3x97v pixels, where mxe2x89xa7u and nxe2x89xa7v, by sequentially setting the sub-region mask indifferent positions within the mask, and obtains the maximum value of pixel densities within each of the sub-region masks. The characteristic amount calculating means calculates the characteristic amount using the maximum value of the pixel densities obtained within the mask by the sub-region mask generation circuit. The average pixel density calculating means obtains the average pixel density in the sub-region mask having the smallest density variation of all the sub-region masks generated by the sub-region mask generation circuit. The characteristic signal generating means associates the average pixel density from the average pixel density calculating means with the characteristic amount supplied from the characteristic amount calculating means and generates a characteristic signal representing the characteristic amount associated with the average pixel density.
The region discriminating means discriminates the characteristics of the region the density of which, binarized by the binarizing circuit, is high, to consider the characteristic amount represented by the characteristic signal generated by the characteristic signal generating means for the region as the discrimination result for the object pixel. In this way, if the input signal contains pixel displacements, noise, etc., since the characteristic of the region is discriminated based on the average pixel density of the sub-region mask having the smallest density variation of all the sub-region masks, the characteristic of the region can be discriminated accurately by reducing the effects of pixel displacements, noise, etc.
As described above, since the characteristics of each image region of a document containing a mixture of characters, photographs, halftone dots, etc. are discriminated based on the average pixel density of the region having the smallest pixel density variation in the sub-region mask sequentially moved within the mask so set as to contain the object pixel, good discrimination can be accomplished even when the input signal contains pixel displacements, noise, etc.
In the invention it is preferable that the characteristic signal generated by the characteristic signal generating means is a signal which makes it possible to discriminate the color of the region.
According to the invention, since the color of the region can be discriminated using the characteristic signal generated by the characteristic signal generating means, it becomes possible to vary the base color removal ratio, etc. for each color in the post-process, and the post-process can be performed in a variety of ways and in suitable fashion. As described above, according to the invention, since the characteristics of each image region can be discriminated by discriminating the color of the region, the post-process appropriate to the color can be performed.
In the invention it is preferable that the characteristic signal generated by the characteristic signal generating means is a signal which makes it possible to discriminate a character region.
According to the invention, since a character region can be discriminated using the characteristic signal, it becomes possible to vary, for example, filter coefficients in the post-process, and the post-process can be performed in a variety of ways and in suitable fashion. As described above, according to the invention, since the characteristics of each image region can be discriminated by determining whether the region is a character region or not, an appropriate post-process can be applied to the character region, etc.
In the invention it is preferable that the region discriminating means takes the discrimination result as a discrimination result representing only the object pixel.
According to the invention, since the discrimination result obtained from the region discriminating means is taken as the discrimination result representing only the object pixel, the characteristics can be discriminated on a pixel by pixel basis, and a pixel by pixel detail region discrimination can thus be accomplished. Since a detailed region discrimination result can be obtained in this way, image processing appropriate to the characteristics can be performed on a pixel by pixel basis.
In the invention it is preferable that the region discriminating means takes the discrimination result as a discrimination result for all the pixels within the mask.
According to the invention, since the region discrimination result for the object pixel is applied to all the pixels, including the object pixel, within the mask, there is no need to perform region discrimination on every input pixel.
This achieves higher processing speed and permits reductions in cost.
In the invention it is preferable that the region discriminating means takes the discrimination result as a characteristic discrimination result for a region including neighboring pixels outside the mask.
According to the invention, since the discrimination result for the object pixel is taken as the discrimination result for the pixels in the region larger than the mask, the characteristic of the region can be discriminated quickly, while achieving reductions in cost.
As described above, according to the invention, since the region discrimination result for the object pixel is applied not only to the object pixel but also to other pixels including the pixels outside the mask, there is no need to perform region discrimination on every input pixel. This serves to further increase the processing speed and further reduce the costs.
In the invention it is preferable that the image processing apparatus further comprises an edge detection device for detecting a non-colored edge region using the discrimination result supplied from the region discriminating means.
According to the invention, since the edge detection device detects a non-colored edge region using the discrimination result supplied from the region discriminating means, the image processing apparatus can apply image processing to enhance the edges of non-colored characters, etc. As described above, according to the invention, since non-colored edge regions, etc. can be detected with good accuracy, the edges of black characters, etc. can be enhanced.
In the invention it is preferable that the image processing apparatus further comprises a black generation device for varying an amount of black generation in accordance with the discrimination result supplied from the region discriminating means.
According to the invention, since the black generation device varies the amount of black generation in accordance with the discrimination result supplied from the region discriminating means, the post-process can be performed so that, for a region judged to be a non-colored region, the amount of black generation is increased compared with other regions or only a black ink or black toner is used to produce the output. The provision of the black generation device thus serves to reduce the consumption amount of colored ink for color image formation, thus reducing the total amount of toner or ink used. As described above, according to the invention, since non-colored regions, etc. can be discriminated with good accuracy, the function of the black generation apparatus can be utilized effectively.
In the invention it is preferable that the image processing apparatus further comprises a filter a filter coefficient of which is varied in accordance with the discrimination result supplied from the region discriminating means.
According to the invention, since the filter device varies filter coefficients in accordance with the discrimination result supplied from the region discriminating means, a post-process can be performed so that a crisp black character output can be produced by setting the filter coefficients to provide, for example, an edge enhancing filter for a region judged to be a non-colored edge and a smoothing filter for other regions. As described above, according to the invention, image processing which matches the characteristic of the region can be performed by varying the filter coefficients, etc. of the filter device in accordance with the region discrimination result.
In the invention it is preferable that the image processing apparatus further comprises a halftone generation device a halftone density of which is changed in accordance with the discrimination result supplied from the region discriminating means.
According to the invention, since the halftone processing condition is varied in accordance with the discrimination result supplied from the region discriminating means, the process can be changed, for example, to give priority to resolution for a non-colored region and to gray scale reproduction for other regions. As described above, according to the invention, image processing with proper halftone rendition can be performed by reflecting the region discrimination result in the halftone processing condition of the halftone generation device.